<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>Rectangle | ts</title>
	<meta name="description" content="Documentation for ts">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading">Preparing search index...</li>
						<li class="state failure">The search index is not available</li>
					</ul>
					<a href="../index.html" class="title">ts</a>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
							<input type="checkbox" id="tsd-filter-externals" checked />
							<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
							<input type="checkbox" id="tsd-filter-only-exported" />
							<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="../globals.html">Globals</a>
				</li>
				<li>
					<a href="../modules/_laya_maths_rectangle_.html">&quot;laya/maths/Rectangle&quot;</a>
				</li>
				<li>
					<a href="_laya_maths_rectangle_.rectangle.html">Rectangle</a>
				</li>
			</ul>
			<h1>Class Rectangle</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-8 col-content">
			<section class="tsd-panel tsd-comment">
				<div class="tsd-comment tsd-typography">
					<div class="lead">
						<p><code>Rectangle</code> 对象是按其位置（由它左上角的点 (x, y) 确定）以及宽度和高度定义的区域。</p>
						<p>Rectangle 类的 x、y、width 和 height 属性相互独立；更改一个属性的值不会影响其他属性。</p>
					</div>
				</div>
			</section>
			<section class="tsd-panel tsd-hierarchy">
				<h3>Hierarchy</h3>
				<ul class="tsd-hierarchy">
					<li>
						<span class="target">Rectangle</span>
					</li>
				</ul>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Constructors</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#constructor" class="tsd-kind-icon">constructor</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Properties</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#height" class="tsd-kind-icon">height</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#width" class="tsd-kind-icon">width</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#x" class="tsd-kind-icon">x</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#y" class="tsd-kind-icon">y</a></li>
								<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="_laya_maths_rectangle_.rectangle.html#temp" class="tsd-kind-icon">TEMP</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Accessors</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#bottom" class="tsd-kind-icon">bottom</a></li>
								<li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#right" class="tsd-kind-icon">right</a></li>
							</ul>
						</section>
						<section class="tsd-index-section ">
							<h3>Methods</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#addpoint" class="tsd-kind-icon">add<wbr>Point</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#clone" class="tsd-kind-icon">clone</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#contains" class="tsd-kind-icon">contains</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#copyfrom" class="tsd-kind-icon">copy<wbr>From</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#equals" class="tsd-kind-icon">equals</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#intersection" class="tsd-kind-icon">intersection</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#intersects" class="tsd-kind-icon">intersects</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#isempty" class="tsd-kind-icon">is<wbr>Empty</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#recover" class="tsd-kind-icon">recover</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#reset" class="tsd-kind-icon">reset</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#setto" class="tsd-kind-icon">set<wbr>To</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#tostring" class="tsd-kind-icon">to<wbr>String</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class"><a href="_laya_maths_rectangle_.rectangle.html#union" class="tsd-kind-icon">union</a></li>
								<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="_laya_maths_rectangle_.rectangle.html#create" class="tsd-kind-icon">create</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Constructors</h2>
				<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
					<a name="constructor" class="tsd-anchor"></a>
					<h3>constructor</h3>
					<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">new <wbr>Rectangle<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, width<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:27</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>创建一个 <code>Rectangle</code> 对象。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> x: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>矩形左上角的 X 轴坐标。</p>
										</div>
									</div>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> y: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>矩形左上角的 Y 轴坐标。</p>
										</div>
									</div>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> width: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>矩形的宽度。</p>
										</div>
									</div>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> height: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></h5>
									<div class="tsd-comment tsd-typography">
										<div class="lead">
											<p>矩形的高度。</p>
										</div>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
						</li>
					</ul>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Properties</h2>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="height" class="tsd-anchor"></a>
					<h3>height</h3>
					<div class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in laya/maths/Rectangle.ts:27</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>矩形的高度。</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="width" class="tsd-anchor"></a>
					<h3>width</h3>
					<div class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in laya/maths/Rectangle.ts:25</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>矩形的宽度。</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="x" class="tsd-anchor"></a>
					<h3>x</h3>
					<div class="tsd-signature tsd-kind-icon">x<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in laya/maths/Rectangle.ts:21</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>矩形左上角的 X 轴坐标。</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
					<a name="y" class="tsd-anchor"></a>
					<h3>y</h3>
					<div class="tsd-signature tsd-kind-icon">y<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in laya/maths/Rectangle.ts:23</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>矩形左上角的 Y 轴坐标。</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
					<a name="temp" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagStatic">Static</span> TEMP</h3>
					<div class="tsd-signature tsd-kind-icon">TEMP<span class="tsd-signature-symbol">:</span> <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol"> = new Rectangle()</span></div>
					<aside class="tsd-sources">
						<ul>
							<li>Defined in laya/maths/Rectangle.ts:13</li>
						</ul>
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>全局临时的矩形区域，此对象用于全局复用，以减少对象创建</p>
						</div>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Accessors</h2>
				<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
					<a name="bottom" class="tsd-anchor"></a>
					<h3>bottom</h3>
					<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> bottom<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:49</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>此矩形底端的 Y 轴坐标。y 和 height 属性的和。</p>
								</div>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
					<a name="right" class="tsd-anchor"></a>
					<h3>right</h3>
					<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> right<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:44</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>此矩形右侧的 X 轴坐标。 x 和 width 属性的和。</p>
								</div>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
						</li>
					</ul>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Methods</h2>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="addpoint" class="tsd-anchor"></a>
					<h3>add<wbr>Point</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">add<wbr>Point<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:204</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>为当前矩形对象加一个点，以使当前矩形扩展为包含当前矩形和此点的最小矩形。</p>
									<p>此方法会修改本对象。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>x: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>点的 X 坐标。</p>
									</div>
								</li>
								<li>
									<h5>y: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>点的 Y 坐标。</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
							<p>返回此 Rectangle 对象。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="clone" class="tsd-anchor"></a>
					<h3>clone</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">clone<span class="tsd-signature-symbol">(</span>out<span class="tsd-signature-symbol">?: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:171</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>返回一个 Rectangle 对象，其 x、y、width 和 height 属性的值与当前 Rectangle 对象的对应值相同。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> out: <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> = null</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>（可选）用于存储结果的矩形对象。如果为空，则创建一个新的。建议：尽量复用对象，减少对象创建消耗。。Rectangle.TEMP对象用于对象复用。</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
							<p>Rectangle 对象，其 x、y、width 和 height 属性的值与当前 Rectangle 对象的对应值相同。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="contains" class="tsd-anchor"></a>
					<h3>contains</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">contains<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:114</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>确定由此 Rectangle 对象定义的矩形区域内是否包含指定的点。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>x: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>点的 X 轴坐标值（水平位置）。</p>
									</div>
								</li>
								<li>
									<h5>y: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>点的 Y 轴坐标值（垂直位置）。</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
							<p>如果 Rectangle 对象包含指定的点，则值为 true；否则为 false。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="copyfrom" class="tsd-anchor"></a>
					<h3>copy<wbr>From</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">copy<wbr>From<span class="tsd-signature-symbol">(</span>source<span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:100</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>复制 source 对象的属性值到此矩形对象中。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>source: <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
							<p>返回属性值修改后的矩形对象本身。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="equals" class="tsd-anchor"></a>
					<h3>equals</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">equals<span class="tsd-signature-symbol">(</span>rect<span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:192</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>检测传入的 Rectangle 对象的属性是否与当前 Rectangle 对象的属性 x、y、width、height 属性值都相等。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>rect: <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>待比较的 Rectangle 对象。</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
							<p>如果判断的属性都相等，则返回 true ,否则返回 false。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="intersection" class="tsd-anchor"></a>
					<h3>intersection</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">intersection<span class="tsd-signature-symbol">(</span>rect<span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a>, out<span class="tsd-signature-symbol">?: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:140</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>如果在 rect 参数中指定的 Rectangle 对象与此 Rectangle 对象相交，则返回交集区域作为 Rectangle 对象。如果矩形不相交，则此方法返回null。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>rect: <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>待比较的矩形区域。</p>
									</div>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> out: <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> = null</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>（可选）待输出的矩形区域。如果为空则创建一个新的。建议：尽量复用对象，减少对象创建消耗。</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></h4>
							<p>返回相交的矩形区域对象。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="intersects" class="tsd-anchor"></a>
					<h3>intersects</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">intersects<span class="tsd-signature-symbol">(</span>rect<span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:130</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>确定在 rect 参数中指定的对象是否与此 Rectangle 对象相交。此方法检查指定的 Rectangle 对象的 x、y、width 和 height 属性，以查看它是否与此 Rectangle 对象相交。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>rect: <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
									<div class="tsd-comment tsd-typography">
										<p>Rectangle 对象。</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
							<p>如果传入的矩形对象与此对象相交，则返回 true 值，否则返回 false。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="isempty" class="tsd-anchor"></a>
					<h3>is<wbr>Empty</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">is<wbr>Empty<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:271</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>确定此 Rectangle 对象是否为空。</p>
								</div>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
							<p>如果 Rectangle 对象的宽度或高度小于等于 0，则返回 true 值，否则返回 false。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="recover" class="tsd-anchor"></a>
					<h3>recover</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">recover<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:80</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>回收</p>
								</div>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="reset" class="tsd-anchor"></a>
					<h3>reset</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">reset<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:72</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>重置</p>
								</div>
							</div>
							<h4 class="tsd-returns-title">Returns <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="setto" class="tsd-anchor"></a>
					<h3>set<wbr>To</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">set<wbr>To<span class="tsd-signature-symbol">(</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:61</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>将 Rectangle 的属性设置为指定值。</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>x: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>x 矩形左上角的 X 轴坐标。</p>
									</div>
								</li>
								<li>
									<h5>y: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>x 矩形左上角的 Y 轴坐标。</p>
									</div>
								</li>
								<li>
									<h5>width: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>矩形的宽度。</p>
									</div>
								</li>
								<li>
									<h5>height: <span class="tsd-signature-type">number</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>矩形的高。</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
							<p>返回属性值修改后的矩形对象本身。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="tostring" class="tsd-anchor"></a>
					<h3>to<wbr>String</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">to<wbr>String<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:183</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>当前 Rectangle 对象的水平位置 x 和垂直位置 y 以及高度 width 和宽度 height 以逗号连接成的字符串。</p>
								</div>
							</div>
							<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
					<a name="union" class="tsd-anchor"></a>
					<h3>union</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
						<li class="tsd-signature tsd-kind-icon">union<span class="tsd-signature-symbol">(</span>source<span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a>, out<span class="tsd-signature-symbol">?: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:157</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>矩形联合，通过填充两个矩形之间的水平和垂直空间，将这两个矩形组合在一起以创建一个新的 Rectangle 对象。</p>
									<p>注意：union() 方法忽略高度或宽度值为 0 的矩形，如：var rect2:Rectangle = new Rectangle(300,300,50,0);</p>
								</div>
							</div>
							<h4 class="tsd-parameters-title">Parameters</h4>
							<ul class="tsd-parameters">
								<li>
									<h5>source: <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h5>
								</li>
								<li>
									<h5><span class="tsd-flag ts-flagDefault value">Default value</span> out: <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> = null</span></h5>
									<div class="tsd-comment tsd-typography">
										<p>用于存储输出结果的矩形对象。如果为空，则创建一个新的。建议：尽量复用对象，减少对象创建消耗。Rectangle.TEMP对象用于对象复用。</p>
									</div>
								</li>
							</ul>
							<h4 class="tsd-returns-title">Returns <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
							<p>充当两个矩形的联合的新 Rectangle 对象。</p>
						</li>
					</ul>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
					<a name="create" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagStatic">Static</span> create</h3>
					<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
						<li class="tsd-signature tsd-kind-icon">create<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></li>
					</ul>
					<ul class="tsd-descriptions">
						<li class="tsd-description">
							<aside class="tsd-sources">
								<ul>
									<li>Defined in laya/maths/Rectangle.ts:91</li>
								</ul>
							</aside>
							<div class="tsd-comment tsd-typography">
								<div class="lead">
									<p>创建</p>
								</div>
							</div>
							<h4 class="tsd-returns-title">Returns <a href="_laya_maths_rectangle_.rectangle.html" class="tsd-signature-type">Rectangle</a></h4>
						</li>
					</ul>
				</section>
			</section>
		</div>
		<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary">
				<ul>
					<li class="globals  ">
						<a href="../globals.html"><em>Globals</em></a>
					</li>
					<li class="current tsd-kind-module">
						<a href="../modules/_laya_maths_rectangle_.html">&quot;laya/maths/<wbr>Rectangle&quot;</a>
					</li>
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-class tsd-parent-kind-module">
						<a href="_laya_maths_rectangle_.rectangle.html" class="tsd-kind-icon">Rectangle</a>
						<ul>
							<li class=" tsd-kind-constructor tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#constructor" class="tsd-kind-icon">constructor</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#height" class="tsd-kind-icon">height</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#width" class="tsd-kind-icon">width</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#x" class="tsd-kind-icon">x</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#y" class="tsd-kind-icon">y</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
								<a href="_laya_maths_rectangle_.rectangle.html#temp" class="tsd-kind-icon">TEMP</a>
							</li>
							<li class=" tsd-kind-get-signature tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#bottom" class="tsd-kind-icon">bottom</a>
							</li>
							<li class=" tsd-kind-get-signature tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#right" class="tsd-kind-icon">right</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#addpoint" class="tsd-kind-icon">add<wbr>Point</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#clone" class="tsd-kind-icon">clone</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#contains" class="tsd-kind-icon">contains</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#copyfrom" class="tsd-kind-icon">copy<wbr>From</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#equals" class="tsd-kind-icon">equals</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#intersection" class="tsd-kind-icon">intersection</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#intersects" class="tsd-kind-icon">intersects</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#isempty" class="tsd-kind-icon">is<wbr>Empty</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#recover" class="tsd-kind-icon">recover</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#reset" class="tsd-kind-icon">reset</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#setto" class="tsd-kind-icon">set<wbr>To</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#tostring" class="tsd-kind-icon">to<wbr>String</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class">
								<a href="_laya_maths_rectangle_.rectangle.html#union" class="tsd-kind-icon">union</a>
							</li>
							<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
								<a href="_laya_maths_rectangle_.rectangle.html#create" class="tsd-kind-icon">create</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer>
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
				<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
				<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
				<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
				<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
				<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>